package com.chinasoft.feignclient.client;

import com.chinasoft.ms.dto.RentalDTO;
import com.chinasoft.ms.dto.RentalRecordDTO;
import com.chinasoft.ms.pojo.Rental;
import com.chinasoft.ms.pojo.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(value = "rental-service")
public interface RentalClient {

    @GetMapping("/rental/carId/{carId}")
    RentalDTO QueryByCarId(@PathVariable Long carId);



    @GetMapping("/rental2/carId/{carId}")
    public RentalRecordDTO QueryByCarId2(@PathVariable Long carId);

    @PutMapping("/status/{rentalId}")
    boolean updateRentalStatus(@PathVariable Long rentalId);

    @GetMapping("/getRentalById/{rentalId}")
    RentalDTO getRentalById(@PathVariable Long rentalId);

    @PostMapping("/addRental")
    public boolean addRental(@RequestBody RentalRecordDTO rentalDTO);
}
